<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<div th:insert ="/demo/include/base::commHead"></div>
<title>选择金融产品</title>
</head>

<body class="ht">
<div th:insert="~{common::loading}"></div>
	<div class="content-wrapper">
		<form class="searchForm" id="searchForm" >
			<div class="card" id="searchModule">
				<div class="card-body">
					<h4 class="card-title">按条件查询金融产品</h4>
					<div class="module searchModule">
						<ul class="mb-3">

							<li style="width: 100%;">
								<label>资金方名称</label>
								<div><input type="text" name="bankOrgName" placeholder="输入资金方名称" /></div>
							</li>
						</ul>
						<div class="searchBtnContainer ml-4" style="top: 0;">
							<input type="hidden" name="token" >
							<input class="btn btn-primary" type="submit" value="查询">
							<input class="btn btn-clear" type="reset" value="清空" role="ClearButton">
						</div>
					</div>
				</div>
			</div>
		</form>

		<form name="listForm" id="listForm" class="listForm" method="post">
			<input  type="hidden" name="productIds" id="selectedIds"/>
			<input type="hidden" name="token">
			<div class="card mb-3 border-top-0">
				<div class="card-body listModule" id="listModule">
					<h4 class="card-title">待选择金融产品列表</h4>
					<div class="module">
						<table cellpadding="0" cellspacing="0" class="hTable">
							<thead>
								<tr>
									<th>序号</th>
									<th>产品名称</th>
									<th>资金方</th>
									<th>适用区域</th>
									<th>发布时间
										<input type="hidden" name="publishTimeOrder" th:value="${sdto.publishTimeOrder}"/>
										<input type="submit" name="publishTimeOrderSubmit" class="ht-orderSwitchButton" th:classappend="${sdto.publishTimeOrder}" th:value="${sdto.publishTimeOrderSubmit}"/>
									</th>
									<th>贷款金额（万元）</th>
									<th>贷款期限（月）</th>
									<th>参考利率</th>
									<th>操作</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td>序号</td>
									<td>产品名称</td>
									<td><a class="textLink-primary" target="_top" role="openFrameWindow">6</a></td>
									<td>适用区域</td>
									<td class="time">发布时间</td>
									<td class="amount">9999</td>
									<td>11</td>
									<td>参考利率</td>
									<td class="select"><a class="btn btn-outline-primary btn-sm selectButton"  data-value="1">选择</a></td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
			</div>
		</form>
	</div>
</body>
<script>
var page=new ListPage();
page.init();

$(".selectButton").on("click",function(event){
	console.log(event.currentTarget.dataset.value)
	var id = event.currentTarget.dataset.value
	parent.setProductById(id);
});
</script>
</html>